import { acceptHMRUpdate, defineStore } from "pinia";
import { addUserApproveInterface, UserInterface } from "~~/types";

interface userStoreInterface {
  addUserApproveList: addUserApproveInterface[];
}

export const useAddUserApprove = defineStore("addUserApprove", {
  state: (): userStoreInterface => {
    return {
      addUserApproveList: [],
    };
  },
  getters: {
    getAddUserApproveList: (state) => state.addUserApproveList,
  },
  actions: {
    setAddUserApproveList(list: addUserApproveInterface[]) {
      this.addUserApproveList = list;
    },
    setAddUserApproveListItem(value: addUserApproveInterface) {
      this.addUserApproveList.push(value);
    },
  },
});

if (import.meta.hot) {
  import.meta.hot.accept(acceptHMRUpdate(useAddUserApprove, import.meta.hot));
}
